package org.NooLab.glue.subscription.context;

import org.NooLab.compare.CompareIntf;
import org.NooLab.compare.utilities.math.DistanceControlProperties;
import org.NooLab.glue.subscription.ContextHeaderDescription;

public interface ComparisonIntf {


	public void setCompareKernel(CompareIntf comparekernel);

	/**
	 * not implemented so far
	 * 
	 * @param distancemethod
	 */
	public void registerCompareDistanceMethod(  DistanceMethodIntf distancemethod );
	
	/**
	 * 
	 * @return
	 */
	public CompareResultHandleIntf getLastResultHandle();

	public void setLastResultHandle(CompareResultHandleIntf resulthandle);
	
	
	
	/**
	 * 
	 * comparing two sets of strings: itemset1 to itemset2, where the threshold refers to itemset1;</br></br>
	 * 
	 * it returns true, if the ratio of met items in set 1 is larger than the threshold value ratio
	 * 
	 * 
	 * @param itemset1
	 * @param itemset2
	 * @param exclitemset
	 * @param threshold
	 * @return
	 */
	public boolean compareSets( DistanceControlProperties dcp,
								String[] itemset1, String[] itemset2, 
								String[] exclitemset,
								double threshold);

	public boolean compareFeatures( DistanceControlProperties dcp,
									double[] valueset1, double[] valueset2, 
									double simThreshold);

	/**
	 * 
	 * comparing the profiles, applying a matching threshold for itemsets, 
	 * 
	 * @return
	 */
	public boolean compareFeatures( DistanceControlProperties dcp,
									String[] itemset1, double[] valueset1, 
									String[] itemset2, double[] valueset2, 
									String[] exclitemset, 
									double matchThreshold, double simThreshold);

	public boolean compareText(String fulltext, String[] simpleSet, double threshold);

	public boolean compareText(String fulltext, ContextHeaderDescription contextdescription);

	public boolean compareText(String fulltext, String templateText);

	public boolean compareSetToContext(String fulltext, Context context);

	public boolean compareimages(byte[] binimage, int mode);

	public boolean compareText(Context contextA, Context contextTemplate);
}
